﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;

namespace PcArduinoControl
{
	public class NonPwmDigitalOutputPinException :
		IncorrectDigitalIoPinTypeException
	{
		const string cDefaultMessage =
			"Tried to use a non-PWM digital IO pin as an PWM output.";

		public NonPwmDigitalOutputPinException() :
			base(cDefaultMessage)
		{ }

		public NonPwmDigitalOutputPinException(string message) :
			base(message)
		{ }

		public NonPwmDigitalOutputPinException(string message, Exception innerException) :
			base(message, innerException)
		{ }

		public NonPwmDigitalOutputPinException(byte pinNumber) :
			base(cDefaultMessage)
		{
			PinNumber = pinNumber;
		}

		public NonPwmDigitalOutputPinException(byte pinNumber, PinType pinType) :
			base(cDefaultMessage)
		{
			PinNumber = pinNumber;
			PinType = pinType;
		}

		public NonPwmDigitalOutputPinException(string message, byte pinNumber) :
			base(message)
		{
			PinNumber = pinNumber;
		}

		public NonPwmDigitalOutputPinException(string message, byte pinNumber, PinType pinType) :
			base(message)
		{
			PinNumber = pinNumber;
			PinType = pinType;
		}

		public NonPwmDigitalOutputPinException(string message, Exception innerException, byte pinNumber) :
			base(message, innerException)
		{
			PinNumber = pinNumber;
		}

		public NonPwmDigitalOutputPinException(string message, Exception innerException, byte pinNumber, PinType pinType) :
			base(message, innerException)
		{
			PinNumber = pinNumber;
			PinType = pinType;
		}

		protected NonPwmDigitalOutputPinException(SerializationInfo info, StreamingContext context) :
			base(info, context)
		{ }
	}
}
